﻿CREATE PROCEDURE [acms].[User_Delete]
	@Id int, 
	@VersionId int
AS
	Update Users
	Set Deleted = 1
	Where Id = @Id  and VersionId = @VersionId
	
	if @@Rowcount <> 1
		if exists (Select null From Users Where Id = @Id)
			return -100
		else
			return -200
	else
		RETURN 0;